import 'package:flutter/material.dart';
import '../../../components/genre_card.dart';
import '../../../constants.dart';

class Genres extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    List<String> genres = [
      '爱情',
      '动画',
      '喜剧',
      '剧情',
      '恐怖',
      '推理',
      '科幻',
      '悬疑',
    ];
    return Container(
      margin: EdgeInsets.symmetric(vertical: kDefaultPadding / 2),
      height: 36,
      child: ListView.builder(
        padding: EdgeInsets.only(right: kDefaultPadding),
        physics: BouncingScrollPhysics(),
        scrollDirection: Axis.horizontal,
        itemCount: genres.length,
        itemBuilder: (context, index) => GenreCard(
          genre: genres[index],
        ),
      ),
    );
  }
}
